import { Route } from 'react-router'
import {IndexRedirect} from 'react-router';
import { WeaErrorPage ,WeaLocaleProvider} from 'ecCom';

import _stores from './stores';

import './style';
import './util';

 import Home from './components/Home';


import TopList from './components/E9/top/TopList';
import ItemDialog from './components/E9/top/ItemDialog';
import Proinfo from './components/E9/proinfo/index';
import Comment from './components/E9/dialog/index';
import GovernMind from './components/E9/governMind';
import GovernReport from './components/E9/governReport';
import GovernInstruct from './components/E9/governInstruct';
import GovernLog from './components/E9/governLog';
import Model from './components/E9/model/index';
import ProMain from './components/E9/pro/proMain';
import ProMain0 from './components/E9/pro/proMain0';
import ProMain1 from './components/E9/pro/proMain1';
import ProMain2 from './components/E9/pro/proMain2';
import ProMain3 from './components/E9/pro/proMain3';
import ProMain4 from './components/E9/pro/proMain4';
import ProSearch from './components/E9/pro/proSearch';
import TaskMain from './components/E9/task/taskMain'
import TaskMain0 from './components/E9/task/taskMain0'
import TaskMain1 from './components/E9/task/taskMain1'
import TaskMain2 from './components/E9/task/taskMain2'
import TaskMain3 from './components/E9/task/taskMain3'
import TaskMain4 from './components/E9/task/taskMain4'
import TaskSearch1 from './components/E9/task/taskSearch';
import ProjAccount from './components/E9/projAccount';
import TaskAccount from './components/E9/taskAccount';
import FeedBack from './components/E9/governFeedback';
import FeedBack0 from './components/E9/governFeedback/index0';
import FeedBack1 from './components/E9/governFeedback/index1';
import GovernProinfoDict from './components/E9/dialog/wea-comment-dict';
import Count from './components/E9/count';

import GovernTag from './components/E9/governPoint/tag';
import GovernBadge from './components/E9/governPoint/badge';
import GovernLight from './components/E9/governPoint/light';
GovernProinfoDict.addWindowFunc();
import Import from './components/E9/import';
const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'govern');

window.govern_store = _stores;
export const stores = _stores;
class Error extends React.Component {
    render() {
      return (
        <WeaErrorPage ecId={`${this && this.props && this.props.ecId || ''}_WeaErrorPage@xazc3b`} msg="对不起，无法找到该页面！" />
      )
    }
}

export  const  Routes = (
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@xm1nx3`} path="govern" name="govern" breadcrumbName="政务" onEnter={getLocaleLabel} component={Home}>
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@39jc4b`} path="top" breadcrumbName="督办立项-" component={TopList} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@w597pm`} path="proinfo" breadcrumbName="督办事项卡片-督办详情" component={Proinfo} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@g496sl`} path="maininfo" breadcrumbName="督办详情主页" component={Comment} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@q2sae7`} path="model" breadcrumbName="弹框模型" component={Model} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@bgwsrm`} path="import" breadcrumbName="批量导入" component={Import} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@br5o3g`} path="govnerMind" breadcrumbName="进度视图" component={GovernMind} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@0avoi7`} path="governReport" breadcrumbName="汇报列表" component={GovernReport} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@zahmge`} path="governInstruct" breadcrumbName="领导批示" component={GovernInstruct} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@c6h6wj`} path="governLog" breadcrumbName="日志列表" component={GovernLog} />
            
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@iws5sf`} path="pro" breadcrumbName="我的督办" component={ProMain}>  {/* dataType?0--4?责任事项/代发事项/监控列表/查询项目结果/我的督办:null:事项查询 5--7督办台账 我负责/我发起/事项查询*/}     
                <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@2uzacv`} path="pro?dataType=0" breadcrumbName="责任事项" component={ProMain} />
                <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@h94xbt`} path="pro?dataType=1" breadcrumbName="代发事项" component={ProMain} />
            </Route>  
            {
              /**
               * 适配知识树，双路由
               */
            }
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@g3mxvp`} path="responsMatters" breadcrumbName="责任事项" component={ProMain0} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@p9l8xm`} path="substitution" breadcrumbName="代发事项" component={ProMain1} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ct4ooh`} path="monitoringList" breadcrumbName="监控列表" component={ProMain2} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@epzf8v`} path="queryItemResults" breadcrumbName="查询项目结果" component={ProMain3} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@4zcmdh`} path="mySupervisor" breadcrumbName="我的督办" component={ProMain4} />      

            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@5mtj6g`} path="proSearch" breadcrumbName="督办查询" component={ProSearch} />                             
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@cnu6ku`} path="task" breadcrumbName="任务" component={TaskMain} />  {/* dataType?0--4? 我的关注/任务查询结果/我的协办/已完成任务/我的主办 : NULL */}  
          
            {
                  /**
                   * 适配指知识树，双路由
                   */
                }
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@hoib55`} path="myConcern" breadcrumbName="我的关注" component={TaskMain0} >
            </Route>   
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@az9gq9`} path="taskQueryReults" breadcrumbName="任务查询结果" component={TaskMain1} >
            </Route>   
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@s9hd2y`} path="myCooperation" breadcrumbName="我的协办" component={TaskMain2} >
            </Route>   
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@gld1d1`} path="taskCompleted" breadcrumbName="已完成任务" component={TaskMain3} >
            </Route>   
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ihr35z`} path="myHosting" breadcrumbName="我的主办" component={TaskMain4} >
            </Route>   

            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@48zien`} path="taskSearch" breadcrumbName="任务查询" component={TaskSearch1} />          
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@xdmzrb`} path="projAccount" breadcrumbName="督办台账" component={ProjAccount} />  
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@e429rc`} path="feedBack" breadcrumbName="督办反馈" component={FeedBack} />    
            {
                  /**
                   * 适配指知识树，双路由
                   */
                }   
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ldu3ia`} path="myFeedBack" breadcrumbName="我的反馈" component={FeedBack0} >   
            </Route>          
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@xc9fi3`} path="feedbackTobeRead" breadcrumbName="待阅反馈" component={FeedBack1} >   
            </Route> 
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@pzgq2k`} path="count" breadcrumbName="统计" component={Count} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@xwt8h3`} path="taskAccount" breadcrumbName="任务台账" component={TaskAccount} />  
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@h2d0ks`} path="*" component={Error}></Route>
        </Route>


);

module.exports =  {
    Route:Routes,
    store:stores,
    components: {
      Model,
      TopList,
      ItemDialog,
      GovernTag,
      GovernBadge,
      GovernLight,
    },
    common: {
        Model,
        TopList,
        ItemDialog,
        GovernTag,
        GovernBadge,
        GovernLight,
    }
}
